package com.gitee.wsl.doc.prosemirror.history.ext

import com.gitee.wsl.doc.prosemirror.history.closeHistoryKey
import com.gitee.wsl.doc.prosemirror.state.Transaction

/** Set a flag on the given transaction that will prevent further steps
// from being appended to an existing history event (so that they
// require a separate undo command to undo).
 */
fun closeHistory(tr: Transaction): Transaction {
    return tr.setMeta(closeHistoryKey, true)
}